package model.compare;

import java.util.Comparator;
import model.SparePart;

/**
 * Compare by UniqueID: if the result is positive than the o1 is the bigger. If
 * the result is negative the o2 is the bigger. if the result is zero that means
 * the two Objects are equals.
 * 
 * @author Csaba Tarkanyi
 */
public class CompareByUniqueID implements Comparator<SparePart> {
	@Override
	public int compare(SparePart o1, SparePart o2) {
		return (int) o1.getUniqueID() - (int) o2.getUniqueID();
	}
}